#pragma once
#include "afxwinforms.h"
#include "BaseForm.h"
#include "Resource.h"
#include "ActionInfo.h"
#include "UCNetCtrlContainer.h"

// CNetCtrlForm dialog

class CNetCtrlForm : public CBaseForm
{
	DECLARE_DYNAMIC(CNetCtrlForm)

public:
	BOOL m_bSuccessed;

public:
	CNetCtrlForm(CWnd* pParent = NULL);   // standard constructor
	virtual ~CNetCtrlForm();

	bool SetAction(const ActionInfo& info);



// Dialog Data
	enum { IDD = IDD_WORKBENCH_WINFORMHOST };

protected:
	virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support

	DECLARE_MESSAGE_MAP()
	afx_msg void OnSize(UINT nType, int cx, int cy);

	virtual CString GetTitle() const;
private:
	ActionInfo m_actioninfo;
	CWinFormsControl<UCNetCtrlContainer> m_ctrl;
public:
	CWinFormsControl<UCNetCtrlContainer>& GetCtrl();
	virtual BOOL OnInitDialog();
	void FloatWindow();

	afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);

	virtual BOOL OnCloseMsgRecieved();

	afx_msg void OnLButtonDblClk(UINT nFlags, CPoint point);
};
